<script type="text/javascript">
head.js('{$path_js}/editor/nicEdit.js');
</script>
<form action="{$base_uri}admin-categories/ajax_save_add" method="post"
	onsubmit="return validate_save_content();">
<table border="0" class="tbl-edit">
	<tr>
		<td colspan="4" align="right"><input type="button"
			onclick="save_item();" name="save" value="Lưu & Tạo mới"> <input
			type="submit" name="save" value="Lưu"></td>
	</tr>
	{if isset($msg)}
	<tr>
		<td>&nbsp;</td>
		<td colspan="3">
			<div id="msg"> 
				<span class="edit-{if isset($isError)}error{else}success{/if}">{foreach from=$msg item=m} {$m}<br />{/foreach} 
			</div>
		</td>
	</tr>
	{/if}
	{if isset($rs->cat_id)}
	<tr>
		<td>ID:</td>
		<td colspan="3">{$rs->cat_id}<input type="hidden" name="id"
			value="{$rs->cat_id}" /></td>
	</tr>
	{/if}
	<tr>
		<td class="lblEdit">Tiêu đề <em>*</em></td>
		<td class="inputEdit"><input type="text" name="title" id="title"
			value="{if isset($rs->title)}{$rs->title}{/if}" tabindex="1"
			onkeyup="replace_vietnamese('title','alias');" /></td>
		<td class="lblEdit">Từ khóa</td>
		<td class="inputEdit"><input type="text" name="keyword" id="keyword"
			value="{if isset($rs->keyword)}{$rs->keyword}{/if}" tabindex="1" /></td>
	</tr>
	<tr>
		<td class="lblEdit">Alias <em>*</em></td>
		<td class="inputEdit"><input type="text" name="alias" id="alias"
			value="{if isset($rs->alias)}{$rs->alias}{/if}" tabindex="1" /></td>
		<td class="lblEdit">Mô tả</td>
		<td class="inputEdit"><input type="text" name="description"
			id="description"
			value="{if isset($rs->description)}{$rs->description}{/if}"
			tabindex="1" /></td>
	</tr>
	<tr>
		<td class="lblEdit">Hiện</td>
		<td class="inputEdit"><input type="checkbox" {if isset($rs->status) &&
		$rs->status eq 1}checked="checked"{/if} name="status" id="status"
		value="1" tabindex="1" /></td>
		<td class="lblEdit">Chủ đề cha</td>
		<td class="inputEdit"><select id="parent" name="parent" tabindex="2">
			<option value="0">--- Chọn chủ đề ---</option>
			{foreach from=$rs_cat item=cat}
			{if $cat->cat_id neq $rs->cat_id}
			<option {if isset($rs->parent_id) && $rs->parent_id eq
			$cat->cat_id}selected="selected"{/if}
			value="{$cat->cat_id}">{$cat->title}</option>
			{/if}
			{/foreach}
		</select></td>
	</tr>
</table>
</form>
